<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8" />
		<title>修改订单信息 - 客户关系管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
		<meta content="" name="author" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />

		<!-- App favicon -->
		<link rel="shortcut icon" href="../assets/images/logo-1.png">

		<!-- App css -->
		<link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/jquery-ui.min.css" rel="stylesheet">
		<link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/app.min.css" rel="stylesheet" type="text/css" />

	</head>

	<body class="dark-topbar dark-sidenav">

		<!-- Top Bar Start -->
		<div th:replace="~{common/Top-bar::top-bar}"></div>
		<!-- Top Bar End -->


		<!-- Left Sidenav -->
		<div th:replace="~{common/Left-side-nav::left-side-nav}"></div>
		<!-- end left-sidenav-->

		<div class="page-wrapper">
			<!-- Page Content-->
			<div class="page-content">

				<div class="container-fluid">
					<!-- Page-Title -->
					<div class="row">
						<div class="col-sm-12">
							<div class="page-title-box">
								<h4 class="page-title">客户信息编辑</h4>
							</div>
							<!--end page-title-box-->
						</div>
						<!--end col-->
					</div>
					<!-- end page title end breadcrumb -->

					<div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-body">
									<div class="row">
										<div class="col-lg-12">
											<form th:action="@{/order/order_modify}" method="post">
												<input type="hidden" name="id" th:value="${order.id}">
												<input type="hidden" name="pageSize" th:value="${pageSize}">
												<input type="hidden" name="pageNum" th:value="${pageNum}">
												<input type="hidden" name="keyword" th:value="${keyword}">
												<div class="form-group row">
													<label for="cId"
														   class="col-sm-2 col-form-label text-right">下单客户</label>
													<div class="col-sm-8">
														<select id="cId" name="cId" class="form-control" required>
															<option value="">请选择客户......</option>
															<option th:each="customer : ${customers}"
																	th:selected="${order.cId==customer.id}"
																	th:value="${customer.id}"
																	th:text="${customer.name}">张三</option>
														</select>
														<div class="invalid-feedback">下单客户不能为空</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('cId')}"
															 th:text="${errors.cId}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="pId"
														   class="col-sm-2 col-form-label text-right">下单产品</label>
													<div class="col-sm-8">
														<select id="pId" name="pId" class="form-control" required>
															<option value="">请选择产品......</option>
															<option th:each="product : ${products}"
																	th:selected="${order.pId==product.id}"
																	th:value="${product.id}"
																	th:text="${product.name}">空调</option>
														</select>
														<div class="invalid-feedback">下单产品不能为空</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('pId')}"
															 th:text="${errors.pId}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="pNum"
														   class="col-sm-2 col-form-label text-right">产品数量</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${order == null?'':order.pNum}"  name="pNum"
															   required
															   id="pNum">
														<div class="invalid-feedback">产品数量不能为空</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('pNum')}"
															 th:text="${errors.pNum}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="orderTime"
														   class="col-sm-2 col-form-label text-right">下单时间</label>
													<div class="col-sm-8">
														<input class="form-control" type="datetime-local" value=""
															   th:value="${order == null?'':order.orderTime}" name="orderTime"
															   required
															   id="orderTime">
														<div class="invalid-feedback">下单时间不能为空</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('orderTime')}"
															 th:text="${errors.orderTime}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="other"
														   class="col-sm-2 col-form-label text-right">其它信息</label>
													<div class="col-sm-8">
														<textarea name="other" class="form-control" rows="5" id="other"
																  th:text="${order == null?'':order.other}"
																  maxlength="1000"
														></textarea>
														<div class="invalid-feedback">字数不能超过1000个字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('other')}"
															 th:text="${errors.other}"></div>
													</div>
												</div>
												<div class="row">
													<div class="col-sm-10 ml-auto">
														<button type="submit"
																class="btn btn-gradient-primary">保存</button>
														<button type="reset"
																class="btn btn-gradient-danger">重置</button>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div>
								<!--end card-body-->
							</div>
							<!--end card-->
						</div>
						<!--end col-->
					</div>
					<!--end row-->

				</div><!-- container -->
				<!--end footer-->
			</div>
			<!-- end page content -->
		</div>
		<!-- end page-wrapper -->




		<!-- jQuery  -->
		<script src="../assets/js/jquery.min.js"></script>
		<script src="../assets/js/bootstrap.bundle.min.js"></script>
		<script src="../assets/js/metismenu.min.js"></script>
		<script src="../assets/js/waves.js"></script>
		<script src="../assets/js/feather.min.js"></script>
		<script src="../assets/js/jquery.slimscroll.min.js"></script>
		<script src="../assets/js/jquery-ui.min.js"></script>

		<!-- App js -->
		<script src="../assets/js/app.js"></script>

	</body>

</html>
